import os

# 数据库配置
HOST = 'rm-uf6l0sos4e0m4y082no.mysql.rds.aliyuncs.com'
PORT = '3306'
DATABASE = 'huiyan'
USERNAME = 'liyf'
PASSWORD = 'Aa!23456'

DB_URI = "mysql+pymysql://{username}:{password}@{host}:{port}/{db}?charset=utf8".format(username=USERNAME,
                                                                                        password=PASSWORD, host=HOST,
                                                                                        port=PORT, db=DATABASE)

# debug模式默认关闭
DEBUG = False
# 项目的根目录
BASE_URL = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# 默认支持512M以下的文件
MAX_CONTENT_LENGTH = 512 * 1000 * 1000
# 上传文件的目录
UPLOAD_FOLDER = os.path.join(BASE_URL, 'uploads')
# 可以上传的文件扩展名
ALLOWED_EXTENSIONS = {'txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif', 'doc', 'docx', 'xls', 'xlsx'}

# 数据库配置
SQLALCHEMY_DATABASE_URI = DB_URI
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_ECHO = False

# 邮箱配置
# MAIL_SERVER = 'smtp.163.com'
# MAIL_PORT = 994
# MAIL_USE_SSL = True
# MAIL_USE_TLS = False
# MAIL_USERNAME = 'i153140965@163.com'
# MAIL_PASSWORD = 'xxxxxxx'

# 缓存
# CACHE_TYPE = 'simple'
# CACHE_REDIS_HOST = 'iecoxe.top'
# CACHE_REDIS_PORT = '6379'
